import {_decorator, Component, Node} from 'cc';
import FSMManager from "db://assets/scripts/state/FSMManager";

const {ccclass, property} = _decorator;

export default class FSMState {
    /**
     * 状态ID
     */
    stateId: number;
    /**
     * 当前状态所属的组件
     */
    component: Component;
    /**
     * 当前状态所属的状态机
     */
    fsmManager: FSMManager;


    constructor(stateId: number, component: Component, fsmManager: FSMManager) {
        this.stateId = stateId;
        this.component = component;
        this.fsmManager = fsmManager;
    }

    /**
     * 进入时
     * 只执行一次
     */
    onEnter() {
    }

    /**
     * 更新时
     * 每一帧执行一次
     */
    onUpdate() {
    }
}

